package com.atguigu.tx.service.impl;

import com.atguigu.tx.service.api.StudentService;
import com.atguigu.tx.service.api.TopService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TopServiceImpl implements TopService {

    @Resource
    private StudentService studentService;

    @Transactional
    @Override
    public void topOperation() {
        studentService.writeStuName();

        studentService.writeStuAge();
    }
}
